<template>
	<view class="warp">
		<view class="center">
			<view class="item" v-for="(item,index) in message" :key="index">
				<!-- <view class="red" v-if="item.pm"></view> -->
				<view :class="[item.pm?'title':'title1']">{{item.title}}</view>
				<view :class="[item.pm?'content':'content1']" class="word-omit" style="width: 80%;;">{{item.mark}}</view>
				<view class="time">{{item.add_time}}</view>
				<view class="abs" v-if="item.pm == 0">- <text class="o-money"> {{item.number}}</text></view>
				<view class="add" v-if="item.pm == 1">+<text class="o-money"> {{item.number}}</text></view>
				<view class="yue"><text class="y-word">零钱余额</text>{{item.balance}}</view>
			</view>
		</view>
	</view>
</template>
<script>
	import {
		getCashDetail
	} from '../../../api/api.js'
	export default {
		data() {
			return {
				page: 1,
				limit: 10,

				message: []

			}

		},
		created() {
			this.datainit()
		},
		methods: {
			datainit() {
				let data = {
					page: this.page,
					limit: this.limit
				}
				getCashDetail(data).then(res => {
				this.message = res.data
				})
			}
		}

	}
</script>
<style scoped lang="less">
	.warp {
		background-color: #fafafa;
		display: flex;
		justify-content: center;
		align-items: flex-start;

		.center {
			width: 90%;

			.item {
				padding: 10rpx 40rpx;
				margin-top: 30rpx;
				position: relative;
				height: 180rpx;
				background-color: #FFFFFF;

				.title {
					color: #5490FE;
					font-size: 28rpx;
				}

				.title1 {
					color: #666666;
					font-size: 28rpx;
				}

				.content {
					color: #666666;
					font-size: 22rpx;
					margin-top: 10rpx;
				}

				.content1 {
					color: #999999;
					font-size: 22rpx;
					margin-top: 10rpx;
				}

				.red {
					width: 10rpx;
					height: 10rpx;
					background-color: red;
					border-radius: 50%;
					position: absolute;
					left: 20rpx;
					top: 30rpx;
				}
				.add{
					position: absolute;
					right:20rpx ;
					top:20rpx ;
					font-size: 26rpx;
					font-size: 500;
					color: #FFC300;
				}
				.abs{
					position: absolute;
					right:20rpx ;
						top:20rpx ;
					font-size: 26rpx;
					font-size: 500;
					color: #000000;
				}
				.yue{
					position: absolute;
					right:20rpx ;
					top:120rpx ;
					font-size: 36rpx;
					// font-size: 500;
					color: #999;
				}
				.y-word{
					font-size: 24rpx;
					margin-right: 8rpx;
				}
				.time {
					color: #999999;
					font-size: 26rpx;
					margin-top: 20rpx;
				}
			}
		}

	}
	.o-money{
		font-size: 32rpx;
	}
</style>
